<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>

<script type="text/javascript">
	/***初始化获取猜你喜欢的数据 ，1、 获取曾近浏览的商品，2、如果为空，则获取热销的商品【暂未做查询】***/
	$(function(){
		$.ajax({
			url : "${ctx}/tracks/latelyTracks",
			type : "post",
			async : false,
			success : function(data, status) {
				var html = "";
				//移除已有的标签元素数据
				$(".guess_like .likegoods li").remove();
				//遍历结果信息
				$.each(data, function(i,result){      
					html+= "<li> "
						+" <a href='${ctx}/goods/queryGoodsDetail?id="+result.goodsId+"' target='_blank'> "
						var img = result.picture;
						if(img!=null){
							html+=" <img src='${baseFile}"+img+"' alt='' /> "
						}else{
							html+=" <img src='${ctx}/images/more1.png' alt='' /> "
						}
						html+=" </a> "
							+" <p class='red price'>￥"+result.marketPrice+"</p> "
							+" <p class='des'>"+result.goodsName+"</p> "
							+" </li>";
				});
				$(".guess_like .likegoods").append(html);
  				},
  				error : function(xhr, status, e) {
  					alert("失败错误信息"+e)
  				}
		});
	});

</script>

<div class="container guess_like">
	<p class="f18">猜你喜欢</p>
	<ul class="clearfix likegoods">
		<%-- <li>
			<a href="">
				<img src="${ctx }/images/order1.png" alt="" />
			</a>
			<p class="red price">￥4320.00</p>
			<a href="">韩版女装修雪惠有蕾丝衬</a>
		</li>
		<li>
			<a href="">
				<img src="${ctx }/images/order2.png" alt="" />
			</a>
			<p class="red price">￥4320.00</p>
			<a href="">韩版女装修雪惠有蕾丝衬</a>
		</li>
		<li>
			<a href="">
				<img src="${ctx }/images/order3.png" alt="" />
			</a>
			<p class="red price">￥4320.00</p>
			<a href="">韩版女装修雪惠有蕾丝衬</a>
		</li>
		<li>
			<a href="">
				<img src="${ctx }/images/order4.png" alt="" />
			</a>
			<p class="red price">￥4320.00</p>
			<a href="">韩版女装修雪惠有蕾丝衬</a>
		</li>
		<li class="last">
			<a href="">
				<img src="${ctx }/images/order5.png" alt="" />
			</a>
			<p class="red price">￥4320.00</p>
			<a href="">韩版女装修雪惠有蕾丝衬</a>
		</li>
		
		<li>
			<a href="">
				<img src="${ctx }/images/order1.png" alt="" />
			</a>
			<p class="red price">￥4320.00</p>
			<a href="">韩版女装修雪惠有蕾丝衬</a>
		</li>
		<li>
			<a href="">
				<img src="${ctx }/images/order2.png" alt="" />
			</a>
			<p class="red price">￥4320.00</p>
			<a href="">韩版女装修雪惠有蕾丝衬</a>
		</li>
		<li>
			<a href="">
				<img src="${ctx }/images/order3.png" alt="" />
			</a>
			<p class="red price">￥4320.00</p>
			<a href="">韩版女装修雪惠有蕾丝衬</a>
		</li>
		<li>
			<a href="">
				<img src="${ctx }/images/order4.png" alt="" />
			</a>
			<p class="red price">￥4320.00</p>
			<a href="">韩版女装修雪惠有蕾丝衬</a>
		</li>
		<li class="last">
			<a href="">
				<img src="${ctx }/images/order5.png" alt="" />
			</a>
			<p class="red price">￥4320.00</p>
			<a href="">韩版女装修雪惠有蕾丝衬</a>
		</li> --%>
	</ul>
</div>
